#include <fstream>
#include <string>
#include <sstream>
#include <vector>
#include <iostream>

void Preprocess( const std::string& filename, std::stringstream& str )
{
	std::ifstream inf( filename );

	if ( ! inf.is_open() )	exit( 0 );
	char buf[ 256 ];

	while ( ! inf.eof() )
	{
		inf.getline( buf, 256 );
		std::string temp = buf;
		if ( temp.size() < 1 )	continue;

		std::size_t i = temp.find( "::" );
		str << temp.substr( 0, i ) << ' ';
		temp = temp.substr( i + 2 );

		i = temp.find( "::" );
		str << temp.substr( 0, i ) << ' ';
		temp = temp.substr( i + 2 );

		i = temp.find_last_of( "::" );
		str << temp.substr( i + 1 ) << '\n';
	}
}